package org.egedede.simulation.model;

/**
 * An end condition is used to stop a {@link Simulation}.<p/>
 * If the {@link Model} match the end condition, then the simulation is stopped for this {@link Model}.
 * @author tiaped
 */
public interface EndCondition {
	
	/**
	 * Test if the @{link Model} has met this end condition
	 * @param model the model to test
	 * @return true if the @{link Model} has met this end condition false otherwise
	 * @throws IllegalArgumentException if the model type not match this end condition type
	 * 
	 */
	public boolean isFinished(Model model) throws IllegalArgumentException;
	
	/**
	 * Returns {@link ModelType} of this end condition
	 * @return types
	 */
	public ModelType getType();
}
